package com.kitwee.serialport.decoder.mitsubishi;


/**
 * 三菱Q系列解码器
 * 
 * @author szhyde
 *
 */
public class QSpeedFormFloatDecoder extends QInstructionToFloatDecoder {

	@Override
	public  synchronized Object decode(byte[] source) {
		Object returnObject = super.decode(source);

		/*Float returnObjectTemp = Float.valueOf(String.valueOf(returnObject));
		if (deviceStatus.getExpand().containsKey("teeth_count")
				&& deviceStatus.getExpand().containsKey("product_count")) {
			Float teethCount = Float.valueOf(String.valueOf(deviceStatus.getExpand().get("teeth_count")));
			Float productCount = Float.valueOf(String.valueOf(deviceStatus.getExpand().get("product_count")));
			//圆刀产品个数计算工试，(运行长度*1000/齿数*3.175)*滚刀产品数量(齿数*3.175的单位是MM，运行速度的单位是M)
			Float standardSpeed = (returnObjectTemp*1000/(teethCount*3.175f))*productCount;
			deviceStatus.getExpand().put("standard_speed", standardSpeed.intValue());
		}else{
			deviceStatus.getExpand().put("standard_speed", 0);
		}*/
		return returnObject;
	}

}
